<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">

<title>博客后台 - 主页</title>
<link rel="shortcut icon"
	href="${pageContext.request.contextPath}/images/favicon.ico">
<meta name="keywords" content="">
<meta name="description" content="">
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/plugins/webuploader/webuploader.css">
<link rel="stylesheet"href="${pageContext.request.contextPath}/css/plugins/webuploader/webuploader-demo.css">
<link href="${pageContext.request.contextPath}/css/animate.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/layui/dist/css/modules/layer/default/layer.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/fakeLoader.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
</head>

<body class="fixed-sidebar full-height-layout white-bg"
	style="overflow: hidden;">
	<div id="fakeloader"></div>
	<div id="wrapper">
		<!--左侧导航开始-->
		<nav class="navbar-default navbar-static-side" role="navigation">
			<div class="nav-close">
				<i class="fa fa-times-circle"></i>
			</div>
			<div class="sidebar-collapse">
				<ul class="nav" id="side-menu">
					<li class="nav-header">
						<div class="dropdown profile-element">
							<span>
							<a  id="headImage" class="fancybox" href="${blogerRole.bloger.headImageUrl}" data-fancybox="images">
								<img id="headImgUrl" alt="images" style="width: 64px; height: 64px;" class="img-circle" src="${blogerRole.bloger.headImageUrl}" />
							</a>
							<%-- <img alt="images" style="width: 64px; height: 64px;" class="img-circle" src="${blogerRole.bloger.headImageUrl}" /> --%>
							</span> 
								<a data-toggle="dropdown" class="dropdown-toggle" href="#"> 
								<span class="clear"> 
									<span class="block m-t-xs">
										<strong class="font-bold">${blogerRole.bloger.name}</strong>
									</span> 
									<span class="text-muted text-xs block">
										${blogerRole.role.roleName}<b class="caret"></b>
									</span>
								</span>
							</a>
							<ul class="dropdown-menu animated fadeInRight m-t-xs">
								<li><a href="javascript:void(0);" data-toggle="modal" data-target="#myModal" onclick="selectBlogById(${blogerRole.bloger.id});">个人资料</a></li>
								<li><a href="javascript:void(0);" data-toggle="modal" data-target="#modal-form" onclick="">修改密码</a></li>
								<li class="divider"></li>
								<li><a href="${pageContext.request.contextPath}/admin/logout/${blogerRole.bloger.username}">安全退出</a></li>
							</ul>
						</div>
						<div class="logo-element"></div>
					</li>
					<li>
					<a href="${pageContext.request.contextPath}/admin/index_v1.jsp" class="J_menuItem">
						 <i class="fa fa-home"></i> 
						 <span class="nav-label">主页</span>
					</a>
					</li>
					<shiro:hasPermission name = "sys:sys:sys">
					<li>
						<a href="#" class="messages">
						<i class="fa fa-bars"></i>
						<span class="nav-label">系统管理 </span>
						</a>
						<ul class="nav nav-second-level">
						<shiro:hasPermission name = "sys:bloger:bloger">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/system/blogers.jsp">
										用戶管理 
								</a>
							</li>
						</shiro:hasPermission>
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/system/dept.jsp">
										部门管理 
								</a>
							</li>
						<shiro:hasPermission name = "sys:role:role">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/system/roles.jsp">
									角色管理 
								</a>
							</li>
						</shiro:hasPermission>
						<shiro:hasPermission name = "sys:message:message">
							<li class="isMessages">
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/system/message.jsp">
									消息管理 
								</a>
							</li>
						</shiro:hasPermission>
						<shiro:hasPermission name = "sys:menu:menu">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/system/menu.jsp">
									菜单管理 
								</a>
							</li>
						</shiro:hasPermission>
						</ul>
					</li>
					</shiro:hasPermission>
					<shiro:hasPermission name = "sys:log:log">
					<li>
						<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/log/log.jsp">
						<i class="fa fa-hourglass-2"></i> 
						<span class="nav-label">操作日志</span>
						</a>
					</li>
					</shiro:hasPermission>
					<shiro:hasPermission name = "sys:chart:chart">
					<li>
						<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/charts/eCharts.jsp">
						<i class="fa fa-bar-chart"></i>
						<span class="nav-label">统计图表</span>
						</a>
					</li>
					</shiro:hasPermission>
					<shiro:hasPermission name = "sys:blog:group">
					<li>
						<a href="#">
						<i class="fa fa-book"></i>
						 <span class="nav-label">博客模块</span>
						 <span class="fa arrow"></span>
						</a>
						<ul class="nav nav-second-level">
							<shiro:hasPermission name = "sys:blog:list">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/blog/blogTable.jsp">博客管理</a>
							</li>
							</shiro:hasPermission>
							<shiro:hasPermission name = "sys:blog:add">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/blog/addBlog.jsp">写博客</a>
							</li>
							</shiro:hasPermission>
							<shiro:hasPermission name = "sys:blog:list">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/blog/findBlog.jsp">查询博客</a>
							</li>
							</shiro:hasPermission>
							<shiro:hasPermission name = "sys:blog:list">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/blog/blogType.jsp">类别</a>
							</li>
							</shiro:hasPermission>
						</ul>
					</li>
					</shiro:hasPermission>
					<shiro:hasPermission name = "sys:resource:resource">
					<li>
						<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/resource/resource.jsp">
						<i class="fa fa-table"></i> 
						<span class="nav-label">资源模块</span>
						</a>
					</li>
					</shiro:hasPermission>
					<shiro:hasPermission name = "sys:visit:visit">
					<li>
						<a href="#">
							 <i class="fa fa-street-view"></i>
							 <span class="nav-label">访客模块</span>
							 <span class="fa arrow"></span>
						</a>
						<ul class="nav nav-second-level">
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/visit/visit.jsp">
									访客记录
								</a>
							</li>
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/visit/visitTable.jsp">
									访客统计
								</a>
							</li>
							<li>
								<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/visit/black.jsp">
									黑名单
								</a>
							</li>
						</ul>
					</li>
					</shiro:hasPermission>
					<shiro:hasPermission name = "sys:link:link">
					<li>
						<a href="#" class="links">
						<i class="fa fa-unlink"></i>
						<span class="nav-label">友情链接</span>
						</a>
						<ul class="nav nav-second-level">
							<li>
							<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/links/links.jsp">
									友情链接 
							</a>
							</li>
							<li class="isApplyLinks">
							<a class="J_menuItem" href="${pageContext.request.contextPath}/admin/links/isApplyLinks.jsp">
									未处理消息
						 	</a>
							</li>
						</ul>
					 </li>
					</shiro:hasPermission>
					<li>
						<a href="http://changyan.kuaizhan.com/" class="J_menuItem">
							<i class="fa fa-commenting-o"></i>
							<span class="nav-label">评论模块</span>
						</a>
					</li>
					<shiro:hasPermission name = "sys:pic:pic">
					<li>
						<a href="${pageContext.request.contextPath}/admin/pics/pics.jsp" class="J_menuItem">
						<i class="fa fa-picture-o"></i>
						<span class="nav-label">本地图库</span>
						</a>
					</li>
					</shiro:hasPermission>
					<li>
						<a href="${pageContext.request.contextPath}/main" target="_blank">
							<i class="fa fa-desktop"></i> 
							<span class="nav-label">前台页面 </span>
						</a>
					</li>
				</ul>
			</div>
		</nav>
		<!--左侧导航结束-->
		<!--右侧部分开始-->
		<div id="page-wrapper" class="white-bg dashbard-1">
			<div class="row border-bottom">
				<nav class="navbar navbar-static-top" role="navigation"
					style="margin-bottom: 0">
					<!-- <div id="myTime" style="display:inline;margin-left:-250px;">
						<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="200" height="80" id="honehoneclock" align="middle">
						 <param name="allowScriptAccess" value="always">
						 <param name="movie" value="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_wh.swf">
						 <param name="quality" value="high">
						 <param name="bgcolor" value="#ffffff">
						 <param name="wmode" value="transparent">
						 <embed wmode="transparent" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_wh.swf" 
						 quality="high" bgcolor="#ffffff" width="170" height="80" name="honehoneclock" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
						 </object>		
					</div> -->
					<div class="navbar-header">
						<a class="navbar-minimalize minimalize-styl-2 btn btn-primary "
							href="javascript:void(0)"><i class="fa fa-bars"></i> </a>

					</div>
					<ul class="nav navbar-top-links navbar-right">
						<li class="dropdown hidden-xs"><a class="right-sidebar-toggle" aria-expanded="false"> <i
								class="fa fa-tasks"></i> 主题
						</a></li>
					</ul>
				</nav>
			</div>
			<div class="row content-tabs">
				<button class="roll-nav roll-left J_tabLeft">
					<i class="fa fa-backward"></i>
				</button>
				<nav class="page-tabs J_menuTabs">
					<div class="page-tabs-content">
						<a href="javascript:void(0)" class="active J_menuTab"
							data-id="${pageContext.request.contextPath}/admin/index_v1.jsp">主页</a>
					</div>
				</nav>
				<button class="roll-nav roll-right J_tabRight">
					<i class="fa fa-forward"></i>
				</button>
				<div class="btn-group roll-nav roll-right">
					<button class="dropdown J_tabClose" data-toggle="dropdown">
						关闭操作<span class="caret"></span>

					</button>
					<ul role="menu" class="dropdown-menu dropdown-menu-right">
						<li class="J_tabShowActive"><a>定位当前选项卡</a></li>
						<li class="divider"></li>
						<li class="J_tabCloseAll"><a>关闭全部选项卡</a></li>
						<li class="J_tabCloseOther"><a>关闭其他选项卡</a></li>
					</ul>
				</div>
				<a href="${pageContext.request.contextPath}/admin/logout/${blogerRole.bloger.username}"
					class="roll-nav roll-right J_tabExit"><i
					class="fa fa fa-sign-out"></i> 退出</a>
			</div>
			<div class="row J_mainContent" id="content-main">
				<iframe class="J_iframe" name="iframe0" width="100%" height="100%"
					src="${pageContext.request.contextPath}/admin/index_v1.jsp"
					frameborder="0"
					data-id="${pageContext.request.contextPath}/admin/index_v1.jsp"
					seamless>
				</iframe>
			</div>
			<div class="footer">
				<div  style="text-align: center;">
					&copy; 2018 <a href="http://www.yuou.fun" target="_blank">  噢米噶</a>
				</div>
			</div>
		</div>
		<!--右侧部分结束-->
		<!--右侧边栏开始-->
		<div id="right-sidebar">
			<div class="sidebar-container">

				<ul class="nav nav-tabs navs-3">

					<li class="active"><a data-toggle="tab" href="#tab-1"> <i
							class="fa fa-gear"></i> 主题
					</a></li>

				</ul>

				<div class="tab-content">
					<div id="tab-1" class="tab-pane active">
						<div class="sidebar-title">
							<h3>
								<i class="fa fa-comments-o"></i> 主题设置
							</h3>
							<small><i class="fa fa-tim"></i>
								你可以从这里选择和预览主题的布局和样式，这些设置会被保存在本地，下次打开的时候会直接应用这些设置。</small>
						</div>
						<div class="skin-setttings">
							<div class="title">主题设置</div>
							<div class="setings-item">
								<span>收起左侧菜单</span>
								<div class="switch">
									<div class="onoffswitch">
										<input type="checkbox" name="collapsemenu"
											class="onoffswitch-checkbox" id="collapsemenu"> <label
											class="onoffswitch-label" for="collapsemenu"> <span
											class="onoffswitch-inner"></span> <span
											class="onoffswitch-switch"></span>
										</label>
									</div>
								</div>
							</div>
							<div class="setings-item">
								<span>固定顶部</span>

								<div class="switch">
									<div class="onoffswitch">
										<input type="checkbox" name="fixednavbar"
											class="onoffswitch-checkbox" id="fixednavbar"> <label
											class="onoffswitch-label" for="fixednavbar"> <span
											class="onoffswitch-inner"></span> <span
											class="onoffswitch-switch"></span>
										</label>
									</div>
								</div>
							</div>
							<div class="setings-item">
								<span> 固定宽度 </span>

								<div class="switch">
									<div class="onoffswitch">
										<input type="checkbox" name="boxedlayout"
											class="onoffswitch-checkbox" id="boxedlayout"> <label
											class="onoffswitch-label" for="boxedlayout"> <span
											class="onoffswitch-inner"></span> <span
											class="onoffswitch-switch"></span>
										</label>
									</div>
								</div>
							</div>
							<div class="title">皮肤选择</div>
							<div class="setings-item default-skin nb">
								<span class="skin-name "> 
									<a href="javascript:void(0)" class="s-skin-0"> 默认皮肤 </a>
								</span>
							</div>
							<div class="setings-item blue-skin nb">
								<span class="skin-name "> 
									<a href="javascript:void(0)" class="s-skin-1"> 蓝色主题 </a>
								</span>
							</div>
							<div class="setings-item yellow-skin nb">
								<span class="skin-name "> 
									<a href="javascript:void(0)" class="s-skin-3"> 黄色/紫色主题 </a>
								</span>
							</div>
						</div>
					</div>





				</div>

			</div>
		</div>

	</div>
	<!-- 个人资料 -->
	<div class="modal inmodal" id="myModal" tabindex="-1" role="dialog"
					aria-hidden="true">
					<div class="modal-dialog" style="width:702px">
						<div class="modal-content animated fadeInUp">
							<button type="button" class="close" style="margin-right:7px"
								data-dismiss="modal">
								<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
							</button>
							<div class="infos" style="margin:0px;">
								<div class="newsview" style="padding-top:0px;">
								<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" type="hidden">
						<input type="hidden" value="" id="imagePath">
						<div class="form-group">
							<label class="col-sm-3 control-label">头像：</label>
							<div class="col-sm-8">
								<a class="fancybox picPath" href="#pic" data-toggle="modal" onclick="findPicList()">
									<img id="changeImg" alt="头像" title="点击更换头像" style="width: 64px; height: 64px;" class="img-circle" src="${blogerRole.bloger.headImageUrl}" />
								</a>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">姓名：</label>
							<div class="col-sm-8">
								<input id="name" name="name" class="form-control" type="text">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">用户名：</label>
							<div class="col-sm-8">
								<input id="username" name="username" class="form-control" type="text" readonly>
							</div>
						</div>
						<div class="form-group">
								<label class="col-sm-3 control-label">部门：</label>
								<div class="col-sm-8">
									<input id="deptId" name="deptId" class="hidden" th:value="${user.deptId}">
									 <input id="deptName" name="deptName"
										class="form-control" type="text" style="cursor: pointer;"
										onclick="openDept()" readonly="readonly" placeholder="所属部门" >
								</div>
							</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">E-mail：</label>
							<div class="col-sm-8">
								<input id="email" name="email" class="form-control" type="email">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">状态:</label>
							<div class="col-sm-8" id="status">
								
							</div>
						</div>
						<div class="form-group" >
							<label class="col-sm-3 control-label">性别:</label>
							<div class="col-sm-8" id="sex">
								
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">角色:</label>
							<div class="col-sm-8" id="roleId">
								
							</div>
						</div>
						<input type="hidden" name="roleIds" id="roleIds">
					</form>
								</div>
							</div>
							<div class="modal-footer">
								<span class="update"></span>
								<button type="button" class="btn btn-primary"
									data-dismiss="modal">关闭</button>
							</div>
						</div>
					</div>
				</div>
	<%--修改密码--%>
	
	<div id="modal-form" class="modal fade" aria-hidden="true" style="z-index: 99999">
		<div class="modal-dialog" style="width: 25%;">
			<div class="modal-content">
				<div class="modal-body">

					<div class="row">
						<h3 class="m-t-none m-b">修改密码</h3>

						<form role="form" class="form-horizontal">
							<div class="input-group m-b">
								<span class="input-group-addon">原密码</span> 
								<input type="password" placeholder="请输入原密码" onblur="getPassword('${blogerRole.blogerId}','${blogerRole.bloger.username}');" id="oldpassword" class="form-control">
							</div>
							<div id="optips" class="input-group m-b" style=" width:100%;text-align: right;margin-top:0px;margin-bottom:0px;color:red;"></div>
							<div class="input-group m-b">
								<span class="input-group-addon">新密码</span>
								 <input type="password" placeholder="长度大于10须包含英文、数字" id="newpassword" class="form-control">
							</div>
							<div id="nptips" class="input-group m-b" style=" width:100%;text-align: right;margin-top:0px;margin-bottom:0px;color:red;"></div>
							<div class="input-group m-b">
								<span class="input-group-addon">重复密码</span>
								 <input type="password" placeholder="请再次输入密码" id="checkpassword" class="form-control">
							</div>
							<div id="cptips" class="input-group m-b" style=" width:100%;text-align: right;margin-top:0px;margin-bottom:3px;color:red;"></div>
							<div id="update">
							<button id="updatePassword" onclick="doModiPassword('${blogerRole.blogerId}','${blogerRole.bloger.username}');" class="btn btn-sm btn-primary pull-right m-t-n-xs" style="margin-left:35px;" type="button">
							<strong>提交</strong>
							</button>
							</div>
							<div id="close">
							<button class="btn btn-sm btn-primary pull-right m-t-n-xs" data-toggle="modal" data-target="#modal-form" type="button" >
							<strong>关闭</strong>
							</button>
							</div>
						</form>

					</div>
				</div>
			</div>
		</div>
	</div>
	
	
	<!-- 修改头像 -->
	<div class="modal inmodal" id="pic" name="up" tabindex="-1" aria-hidden="true">
				<div class="modal-dialog" style="width:79.3%;margin-top:100px;">
					<div class="modal-content animated fadeInUp">
						<button type="button" class="close" style="margin-right:7px"
							data-dismiss="modal">
							<span aria-hidden="true">&times;</span>
						</button> 
								<div id="uploader" class="wu-example" style="margin:0px 5.6% 0  5.6%;">
                                <div class="queueList">
                                
                                    <div id="dndArea" class="placeholder" style="min-height: 110px;padding-top: 0px;background:none">
                                        <div id="filePicker"></div>
                                        <p>或将照片拖到这里，单次最多可选100张</p>
                                    </div>
                                
                                </div>
                                <div class="statusBar" style="display:none;">
                                    <div class="progress">
                                        <span class="text">0%</span>
                                        <span class="percentage"></span>
                                    </div>
                                    <div class="info"></div>
                                    <div class="btns">
                                        <div id="filePicker2"></div>
                                        <div class="uploadBtn">开始上传</div>
                                    </div>
                                </div>
						</div>
						<shiro:hasPermission name = "sys:pic:pic">
						<div class="modal-body picsList" style="height:260px;overflow:scroll; padding: 0px 30px 0px 30px;">
							
							
						</div>
						</shiro:hasPermission>
					</div>
				</div>
			</div>


	<!-- 全局js -->
	<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/plugins/metisMenu/jquery.metisMenu.js"></script>
	<script src="${pageContext.request.contextPath}/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

	<!-- 后增 -->
	<script src="${pageContext.request.contextPath}/js/plugins/validate/jquery.validate.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/plugins/validate/messages_zh.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/plugins/validate/form-validate-demo.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.js"></script>
	<!-- Web Uploader -->
    <script type="text/javascript">
        // 添加全局站点信息
        var BASE_URL = '${pageContext.request.contextPath}/js/plugins/webuploader';
    </script>
    <script src="${pageContext.request.contextPath}/js/plugins/webuploader/webuploader.min.js"></script>
   <script src="${pageContext.request.contextPath}/js/plugins/webuploader/webuploader-demo2.js"></script>
	<!-- 自定义js -->
	<script src="${pageContext.request.contextPath}/js/hplus.js"></script>
	<script src="${pageContext.request.contextPath}/js/contabs.js"></script>
	<script src="${pageContext.request.contextPath}/js/fakeLoader.min.js"></script>
	<!-- 后增 -->
	<script src="${pageContext.request.contextPath}/js/content.js"></script>
	<script src="${pageContext.request.contextPath}/js/plugins/sweetalert/sweetalert.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/plugins/bootstrap-table/bootstrap-table.min.js"></script> 
	<script src="${pageContext.request.contextPath}/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
	<script src="${pageContext.request.contextPath}/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
	<%-- <script src="${pageContext.request.contextPath}/js/admin/bloger/blogers.js"></script> --%>
	<%-- <script src="${pageContext.request.contextPath}/js/admin/links/links.js"></script> --%>
	<script src="${pageContext.request.contextPath}/js/layer.js"></script>
	<script src="${pageContext.request.contextPath}/static/layui/dist/layui.js"></script>
	
	<script>
		$(document).ready(function() {
			var userAgentInfo = navigator.userAgent;
			var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); 
			for (var v = 0; v < Agents.length; v++) {  
			if (userAgentInfo.indexOf(Agents[v]) > 0) { $("#myTime").css("display","none"); break; }  
			}
			initNoApplyLinksCount(); //初始化未处理链接消息数
		});
		//初始化未处理链接消息数
		var initNoApplyLinksCount = function() {
			$.ajax({
						url : '../admin/selectNoApplyLinksCount',
						type : 'post',
						data : '',
						dataType : 'json',
						success : function(data) {
							var count = '';
							var isApplyLinks = '';
							var messages = '';
							var isMessages = '';
							if (data.status == 200) {
								if(data.mcount>0){
									messages = '<span class="label label-danger pull-right">'
										+ data.mcount + '</span>';
								 	isMessages = '<span class="label label-danger pull-right">'
										+ data.mcount + '</span>';
								}
								if(data.count>0){
									count = '<span class="label label-danger pull-right">'
											+ data.count + '</span>';
									isApplyLinks = '<span class="label label-danger pull-right">'
										+ data.count + '</span>';
								}
							} else {
								count = '<span class="fa arrow"></span>';
								messages = '<span class="fa arrow"></span>';
							}
							$(".links").append(count);
							$(".isApplyLinks").find('a').append(isApplyLinks);
							$(".messages").append(messages);
							$(".isMessages").find('a').append(isMessages);
						},
						error : function() {
						}
					});
		}
	</script>

</body>

</html>
